import request from '@/utils/request'

// 查询党组织架构列表
export function listOrganization(query) {
  return request({
    url: '/business/organization/list',
    method: 'get',
    params: query
  })
}

// 查询党组织架构详细
export function getOrganization(deptId) {
  return request({
    url: '/business/organization/' + deptId,
    method: 'get'
  })
}

// 新增党组织架构
export function addOrganization(data) {
  return request({
    url: '/business/organization',
    method: 'post',
    data: data
  })
}

// 修改党组织架构
export function updateOrganization(data) {
  return request({
    url: '/business/organization',
    method: 'put',
    data: data
  })
}

// 删除党组织架构
export function delOrganization(deptId) {
  return request({
    url: '/business/organization/' + deptId,
    method: 'delete'
  })
}

// 导出党组织架构
export function exportOrganization(query) {
  return request({
    url: '/business/organization/export',
    method: 'get',
    params: query
  })
}